home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / KTUPDAT3.ZIP / DONOTHIN.ZIP / DONOTHIN.ASM next >
Encoding:
Assembly Source File  |  1994-04-12  |  8.0 KB  |  208 lines

  1. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  2. ;
  3. ;                              Donothing.asm
  4. ;                               By Köhntark
  5. ;                              DATE: NOV 93
  6. ;
  7. ;                          Assemble with TASM 2.X
  8. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  9.  
  10. MAIN    SEGMENT BYTE
  11.         ASSUME cs:main,ds:main,ss:nothing     
  12.         org    100h
  13.         
  14. DONUTHIN:
  15. VIRUS:        
  16.  
  17. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  18. ; J-Flag  - Suspicious Jump construct
  19. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  20.  
  21.                 jmp     THERE 
  22. THERE:          jmp     HERE
  23. HERE:           
  24.  
  25.                 mov  dx,Offset MSG
  26.                 mov  ah,09                                                      
  27.                 int  21h         ;display message
  28.                 
  29.                 int     20h     ;PROGRAM NEVER GETS EXECUTED BEYOND THIS POINT!!
  30.                                 ;This is SHMISTICS!
  31.  
  32. MSG         db   'Please scan this file with TBSCAN!$'
  33.         
  34. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  35. ;  E-Flag - Flexible Entry Point
  36. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  37.         
  38.                 call    HAHA
  39. HAHA:           pop     si
  40.                 sub     si,3
  41.  
  42. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  43. ;  O-Flag - Code Overwrite
  44. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  45.  
  46.                                                 ;Restore COM host
  47.                 mov     di,0100h
  48.                 push    di
  49.                 movsw
  50.                 movsw                           ;from ds:si to es:di
  51.                                                 ;------- O flag -------
  52. ;                ret                             ;return to host
  53.                                                 ;------- R flag -------(see below)
  54.               
  55. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  56. ;  R-Flag - Suspicious Relocator
  57. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  58.  
  59.                 push    di                      ;save return address
  60.                 movsw                           ;restore host
  61.                 movsw                           ;from ds:si to es:di
  62.                 ret                             ;return to host
  63.                                                 
  64. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  65. ; A-Flag  - Suspicious Memory Allocation
  66. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  67.  
  68.                 mov     BYTE PTR ds:0000,'M'
  69.                 mov     cx,23h                  ;23h * 16 = 560
  70.                 sub     ds:0012h,cx
  71.                 sub     ds:0003,cx
  72.                 mov     ax,ds:0003              ;
  73.  
  74. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  75. ;  F-Flag - Suspicious file access
  76. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  77.        
  78.        ;Restore date and time of file to be infected
  79.         
  80.                 mov     ax,5701h      
  81.                 mov     dx,WORD PTR [si + F_DATE - VIRUS]
  82.                 mov     cx,WORD PTR [si + F_TIME - VIRUS]
  83.                 int     21h
  84.  
  85.        ;Restore file's attributes
  86.  
  87.                 lea     dx,[si + FNAME - VIRUS] ;get filename
  88.                 mov     cx,[si + ATTR - VIRUS]  ;get old attributes
  89.                 mov     ax,4301h                ;set file attributes to cx
  90.                 int     21h
  91.  
  92.  
  93. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  94. ; S-flag  - Search for COM and EXE     
  95. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  96.  
  97.                 db      '*.COM',0
  98.                 db      '*.EXE',0
  99.  
  100. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  101. ; L-flag  - Trap Software's loading     
  102. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  103.                
  104.                ;simulated resident int21h trap:                
  105.                  
  106.                 pushf                           ;save flags
  107.                 push    cs 
  108.                 pop     es                      ;ES=CS
  109.                 cmp     ah,4Bh                  ;load and execute program
  110.                 je      KILL 
  111.  
  112. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  113. ; D-flag - Disk Write Access      
  114. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  115.  
  116.                 mov     ch,0                    ;ch=track  or cylinder = cx
  117. KILL:
  118.                 mov     ah,5                    ;ah=function, al = interleave
  119.                 mov     dh,0                    ;dh=head
  120.                 mov     dl,80h                  ;dl=drive 0 
  121.                 int     13h                     ;format track                
  122.                 
  123.                 inc     ch                      ;increase track
  124.                 cmp     ch,20h                  ;track 20h?
  125.                 loopnz  KILL                    ;no? keep on formating
  126.  
  127. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  128. ; M-flag - Memory Resident Code      
  129. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  130.                 
  131.                 mov     ax,2521h                ;DOS Services  ah=function 25h
  132.                 mov     dx,offset kill
  133.                 int     21h                     ;set intrpt vector al to ds:dx
  134.  
  135. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  136. ; U-Flag - Undocumented DOS call
  137. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  138.  
  139.                 mov     dx,5945h
  140.                 mov     ax,0FA01h
  141.                 int     21h
  142.         
  143. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  144. ; G-Flag - Garbage Instructions
  145. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  146.        
  147.                 add     ax,34
  148.                 add     bx,34
  149.                 int     65h
  150.                 add     cx,35
  151.                 add     dx,45
  152.                 add     si,23
  153.                 add     di,34
  154.                 nop
  155.                 nop 
  156.                 nop 
  157.                 nop
  158.                 nop
  159.                 add     ax,34
  160.                 add     bx,34
  161.                 add     cx,35
  162.                 add     dx,45
  163.                 add     si,23
  164.                 add     di,34
  165.                 nop
  166.                 nop 
  167.                 nop 
  168.                 nop
  169.                 nop
  170.  
  171. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  172. ;  Z-Flag - EXE / COM determination
  173. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  174.             
  175.                 cmp     WORD PTR [si + START_CODE - VIRUS],'ZM' ;EXE file?
  176.                 je      CONT2                                   ;no? check com
  177.                     
  178.                 cmp     WORD PTR [si + START_CODE - VIRUS],'MZ' ;EXE file?
  179.                 jne     CHECK_COM                               ;no? check com
  180.  
  181. CONT2:
  182. CHECK_COM:
  183.  
  184. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  185. ;  B-Flag - Back to Entry Point
  186. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  187.  
  188.                 mov     si,0100h     
  189.                 push    si  
  190.                 ret  
  191.  
  192. ENDVIRUS        equ     $                 
  193.  
  194. ;═════════════════════════════════════════════════════════════════════════════
  195.  
  196. START_CODE      db      5 dup (?)
  197. HOST_STUB       db      00
  198. ATTR            dw      0
  199. F_DATE          dw      0
  200. F_TIME          dw      0
  201. FNAME           db      13 dup (?)        
  202.  
  203. ZIZE            equ     OFFSET ENDVIRUS  - OFFSET VIRUS
  204.  
  205.  
  206. MAIN ENDS
  207.      END DONUTHIN
  208.